#include <bits/stdc++.h>
using namespace std;
int main() {
    vector<int> myvec;
    //分配一个有5个元素的向量空间
    int* p = myvec.get_allocator().allocate(5);
    //在每个元素构造值i挡在p[i]
    for(int i=0;i<5;i++)
        myvec.get_allocator().construct(&p[i],i);
    cout<<"The allocated array contains:";
    for(int i = 0;i<5;i++)
        cout<<" "<<p[i];
    cout<<"\n";
    //销毁重新分配
    for(int i = 0;i<5;i++)
        myvec.get_allocator().destroy(&p[i]);
    myvec.get_allocator().deallocate(p,5);
    return 0;
}